#ifndef CLASS_H
#define CLASS_H

#include "Namespace.h"

namespace FunctionViewer {
	class Class {
		friend class Main;
		friend class Program;
		friend class Namespace;
		friend class ClassContent;

		//variables.
		private:
		Program *program;
		Namespace *v_namespace;
		Class *prev, *next;
		ClassContent *first_content, *last_content, *current_content;

		unsigned long id;

		unsigned long content_counter, contentcount;
		
		char* cname;

		private:
		void Init(Namespace *f_namespace, unsigned long f_id, char* v_name);
		void DeInit();

		public:
		ClassContent* CreateContent(char* type, char* func_name, char* description);
		void DestroyContent();

		public:
		inline unsigned long GetID() {return id;}
		inline void CacheID() {v_namespace->current_class = this;}
		inline Program* GetProgram() {return program;}
		inline Namespace* GetNamespace() {return v_namespace;}
		inline Class* GetPrev() {return prev;}
		inline Class* GetNext() {return next;}
	};
}

#endif //CLASS_H